package com.example.ssmxuankeback.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.Min;
import lombok.Data;

@Data
@Schema(name = "CoursePageQueryDTO", description = "课程分页查询参数")
public class CoursePageQueryDTO {
    @Schema(description = "当前页码", example = "1")
    @Min(value = 1, message = "页码最小为1")
    private Integer pageNum; // 默认第1页

    @Schema(description = "每页条数", example = "10")
    @Min(value = 1, message = "每页最少1条")
    @Max(value = 100, message = "每页最多100条")
    private Integer pageSize; // 默认每页10条

    @Schema(description = "课程名称（模糊查询）")
    private String courseName;

    @Schema(description = "教师ID")
    private Long teacherId;

    @Schema(description = "排序字段（可选值：courseName/credit）", example = "courseName")
    private String sortBy;

    @Schema(description = "排序方式（asc/desc）", example = "asc")
    private String sortOrder = "asc";
}
